package main
import "fmt"

//通过指针变更变量num的数值
func test(num *int){
	*num = 10
}

func main(){
	var num int = 30
	test(&num)

	fmt.Println(num)
}